/* 全局样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 头部样式 */
.app-header {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.app-header h1 {
  color: #2c3e50;
  font-size: 2rem;
  font-weight: 600;
}

.controls {
  display: flex;
  gap: 10px;
}

.control-button {
  background: #3498db;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.control-button:hover {
  background: #2980b9;
}

/* 搜索栏样式 */
.search-container {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #3498db;
}

.search-button {
  background: #3498db;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 0.2s;
  min-width: 80px;
}

.search-button:hover {
  background: #2980b9;
}

.clear-button {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.2s;
}

.clear-button:hover {
  background: #c0392b;
}

.search-navigation {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  margin-top: 10px;
  border: 1px solid #e9ecef;
}

.search-info {
  color: #495057;
  font-size: 14px;
  margin-bottom: 10px;
  text-align: center;
}

.navigation-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.nav-button {
  background: #6c757d;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  min-width: 100px;
}

.nav-button:hover:not(:disabled) {
  background: #5a6268;
}

.nav-button:disabled {
  background: #adb5bd;
  cursor: not-allowed;
}

.no-results {
  text-align: center;
  color: #6c757d;
  font-style: italic;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-top: 10px;
}

/* 移除了旧的搜索结果列表样式 */

/* 可收起项目样式 */
.content-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.collapsible-item {
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s;
}

.collapsible-item:last-child {
  border-bottom: none;
}

.collapsible-item.highlighted {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
}

.item-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.item-header:hover {
  background: #f8f9fa;
}

.toggle-button {
  background: none;
  border: none;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  padding: 4px 8px;
  margin-right: 12px;
  border-radius: 3px;
  transition: all 0.2s;
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-button:hover {
  background: #e9ecef;
  color: #333;
}

.item-title {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  flex: 1;
}

.item-content {
  padding: 0 20px 20px 52px;
  color: #555;
  line-height: 1.6;
}

.item-content p {
  margin-bottom: 12px;
}

/* 移除了嵌套相关的样式 */

/* 高亮样式 */
.highlight {
  background: #ffeb3b;
  padding: 2px 4px;
  border-radius: 2px;
  font-weight: 600;
}

/* 移除了旧的搜索结果导航样式 */

/* 响应式设计 */
@media (max-width: 768px) {
  .app {
    padding: 10px;
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-header h1 {
    font-size: 1.5rem;
  }

  .controls {
    width: 100%;
    justify-content: flex-start;
  }

  .item-header {
    padding: 12px 16px;
  }

  .item-content {
    padding: 0 16px 16px 44px;
  }

  /* 移除了嵌套相关的响应式样式 */
}